package com.liangzhong.modules.Main.command
{
	import com.common.utils.Debug;
	import com.liangzhong.constants.ApplicationConstants;
	import com.liangzhong.constants.EventConstants;
	import com.liangzhong.constants.HttpWebConst;
	import com.liangzhong.constants.NotificationConstants;
	import com.liangzhong.model.AppData;
	import com.liangzhong.proxy.lobby.LobbyProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 * Lobby信息控制
	 * @author lxh
	 * 
	 */	
	public class LobbyCommand extends SimpleCommand
	{
		public function LobbyCommand()
		{
			super();
		}
		
		override public function execute(notification:INotification):void
		{
			var lobbyProxy :com.liangzhong.proxy.lobby.LobbyProxy = facade.retrieveProxy(LobbyProxy.ProxyName) as LobbyProxy;
			var userId :int = AppData.getInstance().user.userID;
			var gameType :int ;
			switch(notification.getName())
			{
				case ApplicationConstants.Lobby_getUserInfo:
				{
					lobbyProxy.getUserInfo(userId);
					Debug.echo("Lobby -->getUserInfo req",Debug.TRACER);
					break;
				}
				case LobbyProxy.GetUserInfo_Result://用户信息
				{
					Debug.echo("Lobby -->get userinfo res",Debug.TRACER);
					break;
				}
				case ApplicationConstants.Lobby_getUserFortune://
				{
					lobbyProxy.getUserFortune(userId);
					Debug.echo("Lobby -->get fortune req",Debug.TRACER);
					break;
				}
				case LobbyProxy.GetUserFortune_Result://用户财富
				{
					Debug.echo("Lobby -->get fortune res",Debug.TRACER);
					break;
				}
				case LobbyProxy.leaveGameRoomNotify_Result://通知离开游戏房间 比如钱币不足
				{
					break;
				}
				case LobbyProxy.noticeNotify_Result:///公告 通知
				{
					break;
				}
				case LobbyProxy.addFriend_Result:///好友添加通知
				{
					break;
				}
				case ApplicationConstants.Lobby_LobbyChat:///Lobby聊天请求
				{
					break;
				}
				case LobbyProxy.Lobby_Chat_Result:///Lobby聊天通知
				{
					break;
				}
				case LobbyProxy.Lobby_Win_Info_Result:///Lobby聊天通知
				{
					break;
				}
			}
		}
	}
}